package com.bt.dmdb.model;

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name = "ODS_ORDERS")
@SuppressWarnings("serial")
public class Order implements java.io.Serializable {

    private BigDecimal orderId;
    private String orderVersion;
    private BigDecimal customerId;
    private BigDecimal contractId;
    private BigDecimal serviceRequestId;
    private String siteId;
    private BigDecimal sublocationId;
    private BigDecimal quoteid;
    private String quotename;
    private String quoteVersion;
    private String salesChannel;
    private String salesChannelType;
    private String ifcOrder;
    private String mopSent;
    private String serviceName;
    private String orderType;
    private String orderManager;
    private Date orderDate;
    private Date customerSignedDate;
    private Date idd;
    private Date ccd;
    private Date schInstallDate;
    private Date notifyCustServReadyDate;
    private String orderDelayType;
    private String orderDelayReason;
    private String orderDelayComment;
    private String system;
    private Set<OrderKsu> orderKsus = new HashSet<OrderKsu>(0);
    private Set<DmEntity> dmEntities = new HashSet<DmEntity>(0);
    private Set<OrderItem> orderItems = new HashSet<OrderItem>(0);

    public Order() {
    }

    public Order(BigDecimal orderId) {
        this.orderId = orderId;
    }

    public Order(BigDecimal orderId, String orderVersion, BigDecimal customerId, BigDecimal contractId, BigDecimal serviceRequestId, String siteId, BigDecimal sublocationId, BigDecimal quoteid, String quotename, String quoteVersion, String salesChannel, String salesChannelType, String ifcOrder, String mopSent, String serviceName, String orderType, String orderManager, Date orderDate, Date customerSignedDate, Date idd, Date ccd, Date schInstallDate, Date notifyCustServReadyDate, String orderDelayType, String orderDelayReason, String orderDelayComment, String system, Set<OrderKsu> orderKsus, Set<DmEntity> dmEntities, Set<OrderItem> orderItems) {
        this.orderId = orderId;
        this.orderVersion = orderVersion;
        this.customerId = customerId;
        this.contractId = contractId;
        this.serviceRequestId = serviceRequestId;
        this.siteId = siteId;
        this.sublocationId = sublocationId;
        this.quoteid = quoteid;
        this.quotename = quotename;
        this.quoteVersion = quoteVersion;
        this.salesChannel = salesChannel;
        this.salesChannelType = salesChannelType;
        this.ifcOrder = ifcOrder;
        this.mopSent = mopSent;
        this.serviceName = serviceName;
        this.orderType = orderType;
        this.orderManager = orderManager;
        this.orderDate = orderDate;
        this.customerSignedDate = customerSignedDate;
        this.idd = idd;
        this.ccd = ccd;
        this.schInstallDate = schInstallDate;
        this.notifyCustServReadyDate = notifyCustServReadyDate;
        this.orderDelayType = orderDelayType;
        this.orderDelayReason = orderDelayReason;
        this.orderDelayComment = orderDelayComment;
        this.system = system;
        this.orderKsus = orderKsus;
        this.dmEntities = dmEntities;
        this.orderItems = orderItems;
    }

    @Id
    @Column(name = "ORDER_ID", unique = true, nullable = false, scale = 0)
    public BigDecimal getOrderId() {
        return this.orderId;
    }

    public void setOrderId(BigDecimal orderId) {
        this.orderId = orderId;
    }

    @Column(name = "ORDER_VERSION")
    public String getOrderVersion() {
        return this.orderVersion;
    }

    public void setOrderVersion(String orderVersion) {
        this.orderVersion = orderVersion;
    }

    @Column(name = "CUSTOMER_ID", scale = 0)
    public BigDecimal getCustomerId() {
        return this.customerId;
    }

    public void setCustomerId(BigDecimal customerId) {
        this.customerId = customerId;
    }

    @Column(name = "CONTRACT_ID", scale = 0)
    public BigDecimal getContractId() {
        return this.contractId;
    }

    public void setContractId(BigDecimal contractId) {
        this.contractId = contractId;
    }

    @Column(name = "SERVICE_REQUEST_ID", scale = 0)
    public BigDecimal getServiceRequestId() {
        return this.serviceRequestId;
    }

    public void setServiceRequestId(BigDecimal serviceRequestId) {
        this.serviceRequestId = serviceRequestId;
    }

    @Column(name = "SITE_ID")
    public String getSiteId() {
        return this.siteId;
    }

    public void setSiteId(String siteId) {
        this.siteId = siteId;
    }

    @Column(name = "SUBLOCATION_ID", scale = 0)
    public BigDecimal getSublocationId() {
        return this.sublocationId;
    }

    public void setSublocationId(BigDecimal sublocationId) {
        this.sublocationId = sublocationId;
    }

    @Column(name = "QUOTEID", scale = 0)
    public BigDecimal getQuoteid() {
        return this.quoteid;
    }

    public void setQuoteid(BigDecimal quoteid) {
        this.quoteid = quoteid;
    }

    @Column(name = "QUOTENAME")
    public String getQuotename() {
        return this.quotename;
    }

    public void setQuotename(String quotename) {
        this.quotename = quotename;
    }

    @Column(name = "QUOTE_VERSION")
    public String getQuoteVersion() {
        return this.quoteVersion;
    }

    public void setQuoteVersion(String quoteVersion) {
        this.quoteVersion = quoteVersion;
    }

    @Column(name = "SALES_CHANNEL")
    public String getSalesChannel() {
        return this.salesChannel;
    }

    public void setSalesChannel(String salesChannel) {
        this.salesChannel = salesChannel;
    }

    @Column(name = "SALES_CHANNEL_TYPE")
    public String getSalesChannelType() {
        return this.salesChannelType;
    }

    public void setSalesChannelType(String salesChannelType) {
        this.salesChannelType = salesChannelType;
    }

    @Column(name = "IFC_ORDER")
    public String getIfcOrder() {
        return this.ifcOrder;
    }

    public void setIfcOrder(String ifcOrder) {
        this.ifcOrder = ifcOrder;
    }

    @Column(name = "MOP_SENT")
    public String getMopSent() {
        return this.mopSent;
    }

    public void setMopSent(String mopSent) {
        this.mopSent = mopSent;
    }

    @Column(name = "SERVICE_NAME")
    public String getServiceName() {
        return this.serviceName;
    }

    public void setServiceName(String serviceName) {
        this.serviceName = serviceName;
    }

    @Column(name = "ORDER_TYPE")
    public String getOrderType() {
        return this.orderType;
    }

    public void setOrderType(String orderType) {
        this.orderType = orderType;
    }

    @Column(name = "ORDER_MANAGER")
    public String getOrderManager() {
        return this.orderManager;
    }

    public void setOrderManager(String orderManager) {
        this.orderManager = orderManager;
    }

    @Temporal(TemporalType.DATE)
    @Column(name = "ORDER_DATE", length = 7)
    public Date getOrderDate() {
        return this.orderDate;
    }

    public void setOrderDate(Date orderDate) {
        this.orderDate = orderDate;
    }

    @Temporal(TemporalType.DATE)
    @Column(name = "CUSTOMER_SIGNED_DATE", length = 7)
    public Date getCustomerSignedDate() {
        return this.customerSignedDate;
    }

    public void setCustomerSignedDate(Date customerSignedDate) {
        this.customerSignedDate = customerSignedDate;
    }

    @Temporal(TemporalType.DATE)
    @Column(name = "IDD", length = 7)
    public Date getIdd() {
        return this.idd;
    }

    public void setIdd(Date idd) {
        this.idd = idd;
    }

    @Temporal(TemporalType.DATE)
    @Column(name = "CCD", length = 7)
    public Date getCcd() {
        return this.ccd;
    }

    public void setCcd(Date ccd) {
        this.ccd = ccd;
    }

    @Temporal(TemporalType.DATE)
    @Column(name = "SCH_INSTALL_DATE", length = 7)
    public Date getSchInstallDate() {
        return this.schInstallDate;
    }

    public void setSchInstallDate(Date schInstallDate) {
        this.schInstallDate = schInstallDate;
    }

    @Temporal(TemporalType.DATE)
    @Column(name = "NOTIFY_CUST_SERV_READY_DATE", length = 7)
    public Date getNotifyCustServReadyDate() {
        return this.notifyCustServReadyDate;
    }

    public void setNotifyCustServReadyDate(Date notifyCustServReadyDate) {
        this.notifyCustServReadyDate = notifyCustServReadyDate;
    }

    @Column(name = "ORDER_DELAY_TYPE")
    public String getOrderDelayType() {
        return this.orderDelayType;
    }

    public void setOrderDelayType(String orderDelayType) {
        this.orderDelayType = orderDelayType;
    }

    @Column(name = "ORDER_DELAY_REASON")
    public String getOrderDelayReason() {
        return this.orderDelayReason;
    }

    public void setOrderDelayReason(String orderDelayReason) {
        this.orderDelayReason = orderDelayReason;
    }

    @Column(name = "ORDER_DELAY_COMMENT", length = 500)
    public String getOrderDelayComment() {
        return this.orderDelayComment;
    }

    public void setOrderDelayComment(String orderDelayComment) {
        this.orderDelayComment = orderDelayComment;
    }

    @Column(name = "SYSTEM")
    public String getSystem() {
        return this.system;
    }

    public void setSystem(String system) {
        this.system = system;
    }

    @OneToMany(fetch = FetchType.LAZY, mappedBy = "order")
    public Set<OrderKsu> getOrderKsus() {
        return this.orderKsus;
    }

    public void setOrderKsus(Set<OrderKsu> orderKsus) {
        this.orderKsus = orderKsus;
    }

    @OneToMany(fetch = FetchType.LAZY, mappedBy = "order")
    public Set<DmEntity> getDmEntities() {
        return this.dmEntities;
    }

    public void setDmEntities(Set<DmEntity> dmEntities) {
        this.dmEntities = dmEntities;
    }

    @OneToMany(fetch = FetchType.LAZY, mappedBy = "order")
    public Set<OrderItem> getOrderItems() {
        return this.orderItems;
    }

    public void setOrderItems(Set<OrderItem> orderItems) {
        this.orderItems = orderItems;
    }
}
